package com.hx.jvm.jvm.tool;


/**
 * 通过JHSDB查看
 *
 * @author jxrjc
 */
public class JHSDB_TestCase {

    public static void main(String[] args) {
        MyTest myTest = new MyTest();
        myTest.foo();
    }

    static class MyTest {
        // 静态变量发在方法区
        static ObjectHolder staholder = new ObjectHolder();
        // 实例变量放在Java堆中
        ObjectHolder holder = new ObjectHolder();

        private void foo() {
            // 局部变量放在方法栈中
            ObjectHolder locHolder = new ObjectHolder();

            System.out.println("done");
        }
    }

    private static class ObjectHolder {
    }

}
